package server;

import control.CControl;
import java.awt.EventQueue;
import javax.swing.UIManager;

public class Liveview
{
    private static CControl cControl;
    
    public static void main (String args[])
    {
        /*
        // Testing WebSocket key generation:
        System.out.println("Testing WebSocket key generation");
        System.out.println("Received key: dGhlIHNhbXBsZSBub25jZQ==");
        String generated = websocket.Handshake.generateAcceptKey("dGhlIHNhbXBsZSBub25jZQ==");
        System.out.println("Generated key: " + generated);
        System.out.println( "    Should be: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=");
        //*/
        
        /*
        cControl = new CControl();
        
        // Example of retrieving settings:
        //String panelSetting = cControl.getSettingsParameter("panelsettings");
        
        cControl.startServer();
        //cControl.startStreaming();
        cControl.startNotifying();
        
        //*/
        
        try{
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        }
        catch(Exception e){
            System.err.println("WindowsLookAndFeel nie jest dost?pny");
        }
        
        EventQueue.invokeLater(new Runnable()
        {
            @Override
            public void run()
            {
                new SWindowFrame();
            }
        });
        
    }
}
